package com.code9xs.mapper;

import com.code9xs.pojo.ToDo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Mapper
@Repository
public interface ToDoMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(ToDo record);

    int insertSelective(ToDo record);

    ToDo selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(ToDo record);

    int updateByPrimaryKey(ToDo record);

    /**
     * 通过用户id查询当前用户所有待办
     * @param uid
     * @return
     */
    int selectAllCountByUid();

    List<Map<String,Object>> selectAllToDoPagination(@Param("start") Integer start,@Param("pageSize") Integer pageSize);
}